import { useSetState } from "ahooks";
const ListAdd = () => {
  const [o, setO] = useSetState({
    count: 1,
    arr: [1, 2, 3],
    name: "章三",
  });
  return (
    <div>
      列表添加
      <div>
        count: {o.count}
        <hr />
        arr:{o.arr.toString()}
        <hr />
        name: {o.name}
      </div>
      <button
        onClick={() =>
          setO({ count: o.count + 1 })
        }
      >
        +1
      </button>
    </div>
  );
};

export default ListAdd;
